import { Navigate } from "react-router-dom";
const isLogine = () => {
  return sessionStorage.getItem("token");
};
function Privaterouter({ children }: any) {
  if (isLogine()) {
    return children;
  } else {
    return <Navigate to="/login"></Navigate>;
  }
}

export default Privaterouter;
